<template>
    <div>
        <p>名称<input type="text" v-model="from.name"></p>
        <p>价格<input type="text" v-model="from.price"></p>
        <button @click="add">提交</button>
    </div>
</template>

<script>
    export default {
        name:'aaa',
        data(){
            return{
                from:{}
            }
        },
        methods:{
            add(){
                this.$axios.post('/add',this.from).then(res=>{

                })
            }
        }
    }
</script>

<style scoped>

</style>
